package tk.mybatis.springboot.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.springboot.model.City;
import tk.mybatis.springboot.model.Country;
import tk.mybatis.springboot.provider.TestProvider;
import tk.mybatis.springboot.util.MyMapper;

import java.util.List;

public interface TestMapper extends MyMapper<Country> {

    @SelectProvider(type = TestProvider.class, method = "selectAll")
    List<City> getAll(City city);

    @Select("select * from city where (id = #{id})")
    City getById(Integer id);
}
